]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Use sudo to run meson install
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 14 Aug 2023 23:55:47 +0000 (01:55 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 16 Aug 2023 22:30:39 +0000 (22:30 +0000)
Meson stopped using polkit for automatic privilege elevation, and
will no longer attempt any priviledge elevation when not running
interactively.

Running the entire install command as root used to be problematic
in the past, as it could result in ownership changes of files in
the build directory that would result in build failures later,
but the aforementioned change leaves us with little choice.

Apparently `meson install` will spawn `ninja` with dropped
privileges when a rebuild is needed, so hopefully this will
no longer be an issue.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2892>

.gitlab-ci.yml

index c2bfdc13622e80939c47b3082c1b9eaa1b67277a..b00ad77de07fb797539b8130b231ee447d64f405 100644 (file)
@@ -175,11 +175,11 @@ build:
   before_script:
     - .gitlab-ci/checkout-mutter.sh
     - meson mutter mutter/build --prefix=/usr
-    - meson install -C mutter/build
+    - sudo meson install -C mutter/build
   script:
     - meson setup . build -Dbuildtype=debugoptimized -Dman=false --werror --fatal-meson-warnings
     - meson compile -C build
-    - meson install -C build
+    - sudo meson install -C build
   artifacts:
     expire_in: 1 day
     paths:
@@ -194,7 +194,7 @@ test:
     XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
     NO_AT_BRIDGE: "1"
   before_script:
-    - meson install -C mutter/build
+    - sudo meson install -C mutter/build
     - mkdir -m 700 $XDG_RUNTIME_DIR
   script:
     - dbus-run-session -- xvfb-run meson test -C build --no-rebuild
@@ -217,7 +217,7 @@ test-coverity:
   variables:
     GIT_SUBMODULE_STRATEGY: normal
   before_script:
-    - meson install -C mutter/build
+    - sudo meson install -C mutter/build
   script:
     - .gitlab-ci/download-coverity-tarball.sh
     - CC=clang meson coverity-build -Dman=false
@@ -255,7 +255,7 @@ dist:
   stage: deploy
   needs: ["build"]
   before_script:
-    - meson install -C mutter/build
+    - sudo meson install -C mutter/build
     - mkdir -m 700 $XDG_RUNTIME_DIR
   script:
     - dbus-run-session xvfb-run meson dist -C build